// 系统路由

import bikeManage from "./bikeManage"; // 车辆管理路由
import userManage from "./userManage"; // 用户管理路由

export default [
  {
    path: "/",
    name: "home",
    component: () => import("@/views/Home/index.vue"),
    redirect: "/sys/bikeManage/bikeList",
  },
  {
    path: "/sys",
    name: "home",
    component: () => import("@/views/Home/index.vue"),
    redirect: "/sys/bikeManage/bikeList",
    children: [
      ...bikeManage,
      ...userManage,
      {
        path: "/sys/*",
        component: () => import("@/views/404/index.vue"),
      },
    ],
  },
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/Login/index.vue"),
  },
  {
    path: "/404",
    name: "404",
    component: () => import("@/views/404/index.vue"),
  },
  {
    path: "*",
    redirect: "/404",
  }, // 如果没有匹配到任何路径，则重定向到404
];
